package com.xiaoxu.intranetweb.mybatisplusSzappdb.business.gps;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.entity.Gps18Login;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.service.impl.Gps18LoginServiceImpl;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class GetMds {
    @Resource
    private Gps18LoginServiceImpl gps18LoginService;
    public String getMds()
    {
        QueryWrapper<Gps18Login> queryWrapper = new QueryWrapper<>();
//        这个表只会有一条数据
        Gps18Login gps18Login = gps18LoginService.getOne(queryWrapper);
        return gps18Login.getGps18Mds();
    }
//    拿到用户id
    public String getUserId()
    {
        QueryWrapper<Gps18Login> queryWrapper = new QueryWrapper<>();
//        这个表只会有一条数据
        Gps18Login gps18Login = gps18LoginService.getOne(queryWrapper);
        return gps18Login.getGps18UserId();
    }
}